package com.bro.person.admin.service;

import com.bro.person.admin.struct.AdminMenuStruct;
import com.bro.person.admin.struct.SecurityAuthenticateResultStruct;

import java.util.List;

/**
 * @author swallow
 * Created by swallow on 2018/11/2.<br>
 */
public interface ISecurityService {
    /**
     * 查询用户是否有对应权限
     * @param userId
     * @param url 访问url
     * @return
     */
    boolean checkAuthentication(int userId, String url);

    /**
     * 用户登录
     * @param username
     * @param password
     * @return
     */
    SecurityAuthenticateResultStruct authenticate(String username, String password);

    /**
     * 获取对应的菜单
     * @param userId
     * @return
     */
    List<AdminMenuStruct> queryNavResources(int userId);
}
